{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2023, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}

<div id="{{dialogId}}" class="reveal large" data-reveal>
  <div class="row">
    <div class="large-12 columns">
      <h3 id="migrate_vm_header" class="subheader">{{tr "Migrate Virtual Machine"}}</h3>
    </div>
  </div>
  <div class="confirm-resources-header"></div>
  <br>
  <div class="reveal-body">
    <form id="{{dialogId}}Form" action="">
      <div class="row">
        <fieldset>
          <legend>{{tr "Select a Host"}}</legend>
          {{{hostsTableHTML}}}
        </fieldset>
        {{#advancedSection (tr "Advanced Options") }}
        <div class="row">
          <div class="large-6 columns">
            <input type="checkbox" name="enforce" id="enforce"/>
            <label for="enforce">
              {{tr "Enforce capacity checks"}}
              <span class="tip">
                {{tr "If it is set to true, the host capacity will be checked. This will only affect oneadmin requests, regular users resize requests will always be enforced"}}
              </span>
            </label>
          </div>
        </div>
        <br>
        <fieldset class="migrate_vm_ds_selection">
          <legend>{{tr "Select a datastore"}}</legend>
          {{{datastoresTableHTML}}}
        </fieldset>
        {{/advancedSection}}
        <div class="form_buttons reveal-footer">
          <div class="form_buttons">
            <button class="button radius right success" id="migrate_vm_proceed" value="VM.migrate">{{tr "Migrate"}}</button>
          </div>
        </div>
        <button class="close-button" data-close aria-label="{{tr "Close modal"}}" type="button">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
    </form>
  </div>
</div>
